import { createApp } from 'vue'
import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'
// 引入初始化样式文件
import '@/styles/common.scss'
// 引入封装的懒加载插件
import { lazyPlugin } from '@/directives/index'
import { componentPlugin } from '@/components/index'

const app = createApp(App)

const pinia = createPinia()
// 注册pinia
pinia.use(persist)
app.use(pinia)

app.use(componentPlugin)
app.use(router)
app.use(lazyPlugin)
app.mount('#app')
